
function debounce(fn, delay=250) {
	let timer = null;
	return function() {
		clearTimeout(timer)
		timer = setTimeout(()=>{
			fn.apply(this, arguments)
		}, delay)
	}
}

export {
	debounce
}